import request from "@/utils/request";

// 查询资产信息列表
export function listAssets(query) {
  return request({
    url: "/cld/assets/list",
    method: "get",
    params: query,
  });
}

// 查询资产信息详细
export function getAssets(assetsId) {
  return request({
    url: "/cld/assets/" + assetsId,
    method: "get",
  });
}

// 新增资产信息
export function addAssets(data) {
  return request({
    url: "/cld/assets",
    method: "post",
    data: data,
  });
}

// 查询
export function getAssetsList() {
  return request({
    url: "/cld/assets/getList",
    method: "get",
  });
}

// 修改资产信息
export function updateAssets(data) {
  return request({
    url: "/cld/assets",
    method: "put",
    data: data,
  });
}

// 删除资产信息
export function delAssets(assetsId) {
  return request({
    url: "/cld/assets/" + assetsId,
    method: "delete",
  });
}

// TODO: 资产统计

// 资产头部统计
export function assetHeadStatistics(query) {
  return request({
    url: "/cld/assetsStatistics/assetHeadStatistics",
    method: "get",
    params: query,
  });
}

// 资产合计统计
export function totalAssetsStatistics(query) {
  return request({
    url: "/cld/assetsStatistics/totalAssetsStatistics",
    method: "get",
    params: query,
  });
}

// 资产明细
export function selectAssetsDetailsList(query) {
  return request({
    url: "/cld/assetsStatistics/selectAssetsDetailsList",
    method: "get",
    params: query,
  });
}

// 资产明细 - 项目分组
export function selectAssetsDetailsGroupProject(query) {
  return request({
    url: "/cld/assetsStatistics/selectAssetsDetailsGroupProject",
    method: "get",
    params: query,
  });
}

// 资产明细
export function selectCldAssetsDetailsList(query) {
  return request({
    url: "/cld/assetsStatistics/selectCldAssetsDetailsList",
    method: "get",
    params: query,
  });
}
